<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="sl" tagdir="/WEB-INF/tags"%>
<%@page import="com.solution.common.config.PublicConfig"%>
<%@page import="com.solution.admin.home.constants.IndexConstants"%>
<%
	String basePath = PublicConfig.ROOT_PATH;
	String imgRootURL = PublicConfig.IMG_ROOT_URL;
	String ossImgZoomWX = PublicConfig.OSS_IMG_ZOOM_WX; //微信图片缩放
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>确认订单</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/statics_wx/css/style.css?v=20180113">
<link href="<%=basePath%>/statics/plugins/bootstrap-select-1.12.3/css/bootstrap-select.min.css" rel="stylesheet" type="text/css">
<!-- icheck -->
<link rel="stylesheet" href="<%=basePath%>/statics/plugins/iCheck/skins/square/green.css" />
<script type="text/javascript">
//系统域名 
var rootPath = '<%=basePath%>';
// 系统上传文件展示域名
var imgRootURL = '<%=imgRootURL%>';
</script>



<script src="<%=basePath%>/statics/js/jquery.1.11.3.min.js" charset="utf-8" language="javascript" type="text/javascript"></script>
<script src="<%=basePath%>/statics/plugins/bootstrap-select-1.12.3/js/bootstrap-select.min.js" type="text/javascript"></script>
<script src="<%=basePath%>/statics_wx/js/jquery.min.js"></script>
<script src="<%=basePath%>/statics_wx/js/js.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics/plugins/iCheck/icheck.js"></script>

<script src="<%=basePath%>/statics/js/custom.js"></script>
<script src="<%=basePath%>/statics_wx/js/custom.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics/plugins/layer/layer.js"></script>
<script type="text/javascript">
	$(function(){
		
		var delivery_pay_after_flag = 'false';
		
		// 配送弹层
		$('#psbtn').click(function(){
			$('#ps_box').toggle();
		});
		// 配送弹层确认
		$('#btn_select_delivery_type').click(function(){
			var delivery_type= $('#ps_box').find("label.checked").attr("model_value");
			var delivery_type_name = $('#ps_box').find("label.checked").find("strong").text();
			$("#psbtn").find("em").text(delivery_type_name);
			$("#psbtn").attr("tmp_delivery_type",delivery_type);
			if(delivery_type == '4'){
				if($.trim($("#delivery_intro").val()).length == 0){
					layer.msg("请输入配送要求",{time:1000});
					return false;
				}
			}
			$('#ps_box').toggle();
			// 重新计算运费
			cacluateDeliveryFee();
		});
		
		// 运费支付方式弹层
		$('#yfbtn').click(function(){
			$('#yf_box').toggle();
		});
		// 运费支付方式确认
		/**
		$('#btn_select_delivery_fee_pay_type').click(function(){
			var delivery_fee_pay_type= $('#yf_box').find("label.checked").attr("delivery_fee_pay_type");
			var delivery_fee_pay_type_name = $('#yf_box').find("label.checked").find("strong").text();
			$("#yfbtn").find("em").text(delivery_fee_pay_type_name);
			$("#yfbtn").attr("tmp_delivery_fee_pay_type",delivery_fee_pay_type);
			$('#yf_box').toggle();
			// 重新计算运费
			cacluateDeliveryFee();
		});
		*/
		
		/**
		 * 计算运费
		 */
		function cacluateDeliveryFee (){
			var normal_delivery_address_ids = $("#normal_delivery_address_ids").val();
			var express_delivery_address_ids = $("#express_delivery_address_ids").val();
			var normal_delivery_fee = $("#normal_delivery_fee").val();
			var express_delivery_fee = $("#express_delivery_fee").val();
			var other_delivery_fee = $("#other_delivery_fee").val();
			
			// 选中的收货地址
			var deliveryAddressId = $("#delivery_address_id").val();
			// alert("收化地址："+deliveryAddressId);
			
			var last_delivery_fee = 0;
			// 是否到付
			var pay_deliveried_flag = delivery_pay_after_flag;
			// alert("是否到付:"+pay_deliveried_flag);
			if(pay_deliveried_flag && pay_deliveried_flag == 'true'){
				// 到付的话运费就是0
				last_delivery_fee = 0;
				// 修改订单运费
				changeOrderDeliveryFee(last_delivery_fee);
				return false;
			}
			// 选择的配送方式 1- 自提  2 普通  3 快递  4 其它
			var deliveryModel = $("#ps_box").find("label.checked").attr("model_value");;
			// alert("配置方式:"+deliveryModel);
			if(deliveryModel == 1){
				// 自提
				last_delivery_fee = 0;
			}else if(deliveryModel == 2){
				// 普通物流 
				if(normal_delivery_address_ids == "all"){
					// 普通物流全免
					last_delivery_fee = 0;
				}else{
					// 普通物流部分免
					if(isFee(deliveryAddressId, normal_delivery_address_ids )){
						last_delivery_fee = 0;
						// alert("普通部分免运费(0)："+last_delivery_fee);
					}else {
						last_delivery_fee = normal_delivery_fee;
						// alert("普通部分免运费："+last_delivery_fee);
					}
				}
			}else if(deliveryModel == 3){
				// 快递物流 
				if(express_delivery_address_ids == "all"){
					// 快递物流全免
					last_delivery_fee = 0;
				}else{
					// 快递物流部分免
					if(isFee(deliveryAddressId, express_delivery_address_ids )){
						last_delivery_fee == 0;
					}else {
						last_delivery_fee = express_delivery_fee;
					}
				}
			}else if(deliveryModel == 4){
				last_delivery_fee = other_delivery_fee;
				// alert("其它："+last_delivery_fee);
			}
			// alert("运费："+last_delivery_fee);
			// 修改订单运费
			changeOrderDeliveryFee(last_delivery_fee);
		}
		
		function changeOrderDeliveryFee(last_delivery_fee){
			// 上一次算出的运费
			var order_delivery_fee = parseFloat($("#order_delivery_fee").val());
			// alert("原始运费:"+order_delivery_fee);
			// 界面显示本次计算运费
			$("#p_delivery_fee").html("￥<em>"+numberInteger(numberRand2(last_delivery_fee))+"</em>"+numberDecimal(numberRand2(last_delivery_fee)));
			// 隐藏域记录本次运费
			$("#order_delivery_fee").val(last_delivery_fee);
			// alert("本次运费:"+last_delivery_fee);
			// 应付 = 应付 -原来运费 + 新计算的运费
			var real_pay_money = parseFloat($("#order_real_pay_money").val());
			// alert("原始应付金额："+real_pay_money);
			var total_pay_money = numberRand2(real_pay_money - parseFloat(order_delivery_fee) + parseFloat(last_delivery_fee));
			// alert("最终应付金额"+total_pay_money);
			$("#order_real_pay_money_container").html("应付款：￥<em>"+numberInteger(total_pay_money)+"</em>"+numberDecimal(total_pay_money));	
			$("#order_real_pay_money").val(total_pay_money);
		}
		
		// 判断地址是否为免费地址
		function isFee(address_id , delivery_address_ids){
			// alert("选择地址："+address_id + "地址列表："+delivery_address_ids);
			if(!delivery_address_ids || delivery_address_ids == null || delivery_address_ids == ''){
				// alert("地址列表为空");
				return false;
			}
			var addressIdsArr = delivery_address_ids.split(",");
			// alert("地址列表数组:"+addressIdsArr);
			var flag = false;
			for(var i = 0 ;i < addressIdsArr.length; i++){
				if(address_id == addressIdsArr[i]){
					flag = true;
					break;
				}
			}
			// alert("判断结果："+flag);
			return flag;
		}
		// 调用计算运费
		cacluateDeliveryFee();
		
		
		$("#pay_delivered_fee").iCheck({
			checkboxClass: 'icheckbox_square-green',
		    increaseArea: '20%'
		});
		
		// 勾选运费到付
		$('#pay_delivered_fee').on('ifChecked', function(event){
			delivery_pay_after_flag = 'true';
			$("#delivery_fee_tip").show();
			cacluateDeliveryFee();
		}); 
		
		$('#pay_delivered_fee').on('ifUnchecked', function(event){
			delivery_pay_after_flag = 'false';
			$("#delivery_fee_tip").hide();
			var pay_type = $("#zffs_box").find("label.checked").attr("pay_type");
			if(pay_type == "02"){
				layer.tips('货到付款的订单只能选择运费到付', '#pay_delivered_fee', {
					  tips: [1, '#dd2726'],
					  time: 3000
				});
				$(this).iCheck("check");
				return false;
			}
			cacluateDeliveryFee();
		}); 
		
		
		
		// 积分弹层
		$('#jfbtn').click(function(){
			var usable_points = $("#customer_point_usable").val();
			if(!usable_points  || usable_points == 0){
				layer.msg("暂无积分可用",{time:1000});
				return false;
			}
			$('#jf_box').toggle();
		});
		
		
		// 计算订单价格
		function cacaluateOrderRealPayMoney(){
			var use_point = $("#jf_box").find("label.checked").attr("use_point");
			if(!use_point){
				use_point = 0;
			}
			var real_pay_money = $("#order_real_pay_money").val();
			
			var use_coupon_money = $('.yh_box ul li label.checked').find("#user_coupon_money").val();
			if(!use_coupon_money){
				use_coupon_money = 0;
			}
			
			var last_price = parseFloat(real_pay_money) - parseFloat(use_point) - parseFloat(use_coupon_money);
			$("#order_real_pay_money_container").html("应付款：￥<em>"+numberInteger(last_price)+"</em>"+numberDecimal(last_price));	
			$("#order_real_pay_money").val(last_price);
		}
		
		// 积分选择确认
		$('#btn_select_point').click(function(){
			
			$("#jfbtn").find("span em").eq(0).toggle();
			$("#jfbtn").find("span em").eq(1).toggle();
			$('#jf_box').toggle();
			
			var point_money = $("#jf_box").find("label.checked").attr("use_point");
			if(point_money){
				$("#orderPointMoney").html("-￥<em>"+numberInteger(point_money)+"</em>"+numberDecimal(point_money));
			}else{
				$("#orderPointMoney").html("-￥<em>0</em>.00");
			}
			cacaluateOrderRealPayMoney();
		});
		
		// 弹出支付方式层
		$('#zfbtn').click(function(){
			$('#zffs_box').toggle();
		});
		// 选择中支付方式 
		$('#btn_select_pay_type').click(function(){
			var pay_type = $("#zffs_box").find("label.checked").attr("pay_type");
			var pay_type_name = $("#zffs_box").find("label.checked").find("strong").text();
			$("#zfbtn").find("em").text(pay_type_name);
			$("#zfbtn").attr("tmp_pay_type",pay_type);
			$('#zffs_box').toggle();
			
			// 如果是货到付款，自动勾选运费到付
			if(pay_type == '02'){
				delivery_pay_after_flag = 'true';
				$('#pay_delivered_fee').iCheck("check");
				$('#pay_delivered_fee').iCheck("disable");
				$('#delivery_fee_tip').show();
			}else{
				$('#pay_delivered_fee').iCheck("enable");
			}
		});
		
		// 发票弹层
		$('#fpbtn').click(function(){
			$('#fp_box').toggle();
		});
		
		// 发票弹层确认
		$("#btn_select_fp").click(function(){
			var fp_type = $("#fp_box").find("li[type].current").attr("type");
			var fp_type_name = $("#fp_box").find("li[type].current").text();
			var patrn =  /^[0-9a-zA-Z]*$/g;
			var patrnNum = /^(-)?\d+(\.\d+)?$/;
			
			
			$("#companyNameSelect").removeClass("errorBorder");
			$("#fp_box input").removeClass("errorBorder");
			
			if(fp_type=='02'){
				if($.trim($("#invoiceTitle").val()).length == 0) {
					layer.msg('请填写票抬头',{time:1000});
					$("#invoiceTitle").addClass("errorBorder");
					$("#invoiceTitle").focus();
					$("#invoiceTitle").select();
					return false;
				}
				//普通发票税号不用必填
				/* if($.trim($("#taxCode").val()).length == 0){
					layer.msg('请填写税号',{time:1000});
					return false;
				} */
				if (patrn.exec($.trim($("#taxCode").val())) == null || $.trim($("#taxCode").val()) == ""){
					layer.msg('税号只能是数字或字母',{time:1000});
					$("#taxCode").addClass("errorBorder");
					$("#taxCode").focus();
					$("#taxCode").select();
					return false;
				}
			}else if(fp_type=='03'){
				if($.trim($("#companyName").val()).length == 0){
					layer.msg('请填写单位名称',{time:1000});
					$("#companyNameSelect").addClass("errorBorder");
					$("#companyName").focus();
					$("#companyName").select();
					return false;
				}
				if($.trim($("#taxNo").val()).length == 0){
					layer.msg('请填写税号',{time:1000});
					$("#taxNo").addClass("errorBorder");
					$("#taxNo").focus();
					$("#taxNo").select();
					return false;
				}
				if (patrn.exec($.trim($("#taxNo").val())) == null || $.trim($("#taxNo").val()) == ""){
					layer.msg('税号只能是数字或字母',{time:1000});
					$("#taxNo").addClass("errorBorder");
					$("#taxNo").focus();
					$("#taxNo").select();
					return false;
				}
				if($.trim($("#registeAddress").val()).length == 0){
					layer.msg('请填写注册地址',{time:1000});
					$("#registeAddress").addClass("errorBorder");
					$("#registeAddress").focus();
					$("#registeAddress").select();
					return false;
				}
				if($.trim($("#registePhone").val()).length == 0){
					layer.msg('请填写注册电话',{time:1000});
					$("#registePhone").addClass("errorBorder");
					$("#registePhone").focus();
					$("#registePhone").select();
					return false;
				}
				if($.trim($("#openBankName").val()).length == 0){
					layer.msg('请填写开户银行',{time:1000});
					$("#openBankName").addClass("errorBorder");
					$("#openBankName").focus();
					$("#openBankName").select();
					return false;
				}
				if($.trim($("#bankAccount").val()).length == 0){
					layer.msg('请填写银行账户',{time:1000});
					$("#bankAccount").addClass("errorBorder");
					$("#bankAccount").focus();
					$("#bankAccount").select();
					return false;
				}
				if (patrnNum.exec($.trim($("#bankAccount").val())) == null || $.trim($("#bankAccount").val()) == ""){
					layer.msg('银行账户只能是数字',{time:1000});
					$("#bankAccount").addClass("errorBorder");
					$("#bankAccount").focus();
					$("#bankAccount").select();
					return false;
				}
				if($.trim($("#bankAccount").val()).length > 30){
					layer.msg('银行账户长度不能超过30个字符',{time:1000});
					$("#bankAccount").addClass("errorBorder");
					$("#bankAccount").focus();
					$("#bankAccount").select();
					return false;
				}
			}
			var companyName = $("#companyName").val();
			var taxNo = $("#taxNo").val();
			var registeAddress = $("#registeAddress").val();
			var registePhone = $("#registePhone").val();
			var openBankName = $("#openBankName").val();
			var bankAccount = $("#bankAccount").val();
			$.ajax({
				type : "post",
				url : rootPath + '/pc/my/companyInvoice/saveInvoiceAjax',
				data : {
					companyName : companyName,
					taxNo : taxNo,
					registeAddress : registeAddress,
					registePhone : registePhone,
					openBankName : openBankName,
					bankAccount : bankAccount
				},
				async : false,
				datatype : "json",
				success : function(json) {
					
				},
				error : function() {
					layer.msg('保存发票信息错误', {
						icon : 2,
						time : 2000
					});
				}
			});
			$("#fpbtn").find("em").attr("tmp_invoice_type",fp_type);
			$("#fpbtn").find("em").text(fp_type_name);
			$('#fp_box').toggle();
		});
		
		// 提交订单
		$("#btn_commit_order").click(function(){
			// 提交订单
			var itemIds = [];
			$("input[name='itemIds']").each(function(i,item){
				itemIds.push($(this).val());
			});
			// 配送地址id
			var deliveryAddressId = $("#delivery_address_id").val();
			// 支付模式
			var payModel = $("#zffs_box").find("label.checked").attr("pay_type");
			// 配送方式
			var deliveryModel = $("#ps_box").find("label.checked").attr("model_value");
			
			// 物流费支付方式
			var deliveryFeePayModel = delivery_pay_after_flag == "true" ? "02" : "01";
			var invoiceType = $("#fp_box").find("li.current").attr("type");
			
			var companyName = null;
			var taxNo = null;
			var registeAddress = null;
			var registePhone = null;
			var openBankName = null;
			var bankAccount = null;
			
			if('02' == invoiceType) {
				companyName = $("#invoiceTitle").val();
				taxNo = $("#taxCode").val();
			} else if('03' == invoiceType) {
				companyName = $("#companyName").val();
				taxNo = $("#taxNo").val();
				registeAddress = $("#registeAddress").val();
				registePhone = $("#registePhone").val();
				openBankName = $("#openBankName").val();
				bankAccount = $("#bankAccount").val();
			}
			
			var use_point =$("#jfbtn").find("em:visible").attr("use_point");
			
			var couponIds = [];
			var couponMoney = 0;
			$("div.yhq_list_con label.checked").each(function(){
				couponIds.push($(this).find("#user_coupon_id").val());
				couponMoney += parseFloat($(this).find("#user_coupon_money").val());
			});
			var intro = $("#intro").val();
			var delivery_intro = $("#delivery_intro").val();
			
			//如果是分享页面支付则需要记录分享id
			var shareId = $("#shareId").val();
			
			var url = rootPath + "/wx/order/commitOrder";
			$.ajax({
				type: 'POST',
				url: url,
				async: true,
				data: {
					deliveryAddressId: deliveryAddressId,
					shoppingcartIds:itemIds.join(','),
					payModel:payModel,
					deliveryType:deliveryModel,
					deliveryFeePayType:deliveryFeePayModel,
					points: use_point,
					couponMoney : couponMoney,
					couponIds : couponIds.join(','),
					invoiceType :invoiceType,
					companyName : companyName,
					taxNo : taxNo,
					registeAddress : registeAddress,
					registePhone : registePhone,
					openBankName : openBankName,
					bankAccount : bankAccount,
					intro:intro,
					deliveryIntro: delivery_intro,
					shareId: shareId
				},
				dataType: 'json',
				success: function(json) {
					if(json.resultCode == '1'){
						if(json.redirectAdjust == '2'){
							var url = rootPath + "/wx/order/toOrderAdjustPage";
							var form = $('<form></form>');  
							form.attr('action', url);  
							form.attr('method', 'post');
							form.attr('target', '_self');
							form.append('<input type="hidden" name="orderCode" value="'+json.orderCode+'"/>');
							form.append('<input type="hidden" name="deliveryAddress" value="'+json.deliveryAddress+'"/>');
							form.append('<input type="hidden" name="receiverName" value="'+json.receiverName+'"/>');
							form.append('<input type="hidden" name="receiverMobile" value="'+json.receiverMobile+'"/>');
							form.append('<input type="hidden" name="realPayMoney" value="'+json.realPayMoney+'"/>');
							form.appendTo("body");
							form.submit();
						}else{
							// 如果是货到付款，则跳转到订单提交成功页面
							var url = rootPath + "/wx/order/toOrderPay";
							if(json.payModel == '02'){
								// 跳转到上传合同页面
								url = rootPath + "/wx/order/toUploadOrderContract";
							}
							var form = $('<form></form>');  
						    form.attr('action', url);  
						    form.attr('method', 'post');
						    form.attr('target', '_self');
						    form.append('<input type="hidden" name="orderCode" value="'+json.orderCode+'"/>');
						    form.append('<input type="hidden" name="deliveryAddress" value="'+json.deliveryAddress+'"/>');
						    form.append('<input type="hidden" name="receiverName" value="'+json.receiverName+'"/>');
						    form.append('<input type="hidden" name="receiverMobile" value="'+json.receiverMobile+'"/>');
						    form.append('<input type="hidden" name="realPayMoney" value="'+json.realPayMoney+'"/>');
						    form.appendTo("body");
						    form.submit();
						}
						
						
					}
				},
				error: function(){
					layer.msg('订单提交失败,请稍后再试',{time:2000});
				}
			})
		});
		
		// 支付方式 、 物流配送方式多选一、积分
		$('.ps_box dl dt label').click(function(){
			if($(this).hasClass('checked')){
				$(this).addClass('checked');
			}else{
				$(this).addClass('checked');
				$(this).parent().siblings().find('label').removeClass('checked');
			}
			
			// 配送方式
			if($(this).attr("name") == "delivery_model" ){
				var delivery_type = $("label[name='delivery_model'].checked").attr("model_value");
				if(delivery_type == '1' || delivery_type =='4'){
					$("#lab_delivery_fee_pay_type_01").removeClass("checked");
					$("#lab_delivery_fee_pay_type_02").addClass("checked");
					var delivery_fee_pay_type= $('#yf_box').find("label.checked").attr("delivery_fee_pay_type");
					var delivery_fee_pay_type_name = $('#yf_box').find("label.checked").find("strong").text();
					$("#yfbtn").find("em").text(delivery_fee_pay_type_name);
					$("#yfbtn").attr("tmp_delivery_fee_pay_type",delivery_fee_pay_type);
				}
				
				if(delivery_type == '4'){
					$("#con_delivery_intro").show();
				}else{
					$("#con_delivery_intro").hide();
				}
			}
			
			if($(this).attr("name") == "pay_model"){
				var pay_model = $("label[name='pay_model'].checked").attr("pay_type");
				if(pay_model == '02'){
					layer.msg('货到支付的订单将无法享受商品赠送积分', {time: 3000});
					$("#lab_delivery_fee_pay_type_01").removeClass("checked");
					$("#lab_delivery_fee_pay_type_02").addClass("checked");
					var delivery_fee_pay_type= $('#yf_box').find("label.checked").attr("delivery_fee_pay_type");
					var delivery_fee_pay_type_name = $('#yf_box').find("label.checked").find("strong").text();
					$("#yfbtn").find("em").text(delivery_fee_pay_type_name);
					$("#yfbtn").attr("tmp_delivery_fee_pay_type",delivery_fee_pay_type);
				}	
			}
		});
		
		// 运费支付方式多选 一
		$('.yf_box dl dt label').click(function(){
			
			// 支付模式
			var pay_model = $("#zffs_box").find("label.checked").attr("pay_type");
			// 配送方式
			var delivery_type = $("#ps_box").find("label.checked").attr("model_value");
			
			if(pay_model == '02' && $(this).attr("id")  == "lab_delivery_fee_pay_type_01"  && !$(this).hasClass('checked')){
				layer.msg('货到支付的订单运费只能选择运费到付', {time: 2000});
				return false;
			}
			
			if($(this).hasClass('checked')){
				$(this).addClass('checked');
			}else{
				$(this).addClass('checked');
				$(this).parent().siblings().find('label').removeClass('checked');
			}
			
			var check_flag = $("#lab_delivery_fee_pay_type_01").hasClass('checked');
			if(pay_model == '01' && (delivery_type == '2' || delivery_type == '3') && check_flag ){
				layer.msg('运费立即支付：提交订单后，运费由后台人员调整后进行支付订单', {time: 2000});
			}
		});
		
		// 优惠券
		$('.yh_box ul li label').click(function(){
			var x1 = $(this).find("#user_coupon_money").val();
			if($(this).hasClass('checked')){
				$(this).removeClass('checked');
				//var x1 = $(this).find('.box5 strong b span').html();
				//var x1 = $(this).find("#user_coupon_money").val();
				$('#yhqbtn').find('em').html(x1);
			}else{
				$(this).addClass('checked');
				$(this).parent().siblings().find('label').removeClass('checked');
				//var x1 = $(this).find('.box5 strong b span').html();
				// var x1 = $(this).find("#user_coupon_money").val();
				$('#yhqbtn').find('em').html(x1);
			}
			
			var coupon_money = $("div.yhq_list_con").find("label.checked").find("#user_coupon_money").val();
			if(coupon_money){
				$("#orderCouponMoney").html("-￥<em>"+numberInteger(coupon_money)+"</em>"+numberDecimal(coupon_money));
			}else{
				$("#orderCouponMoney").html("-￥<em>0</em>.00");
			}
			cacaluateOrderRealPayMoney();
		});
		
		$('#yhqbtn,#yhq_box .bottom p .inputbtn1').click(function(){
			if($("div.yhq_list_con label").length == 0){
				layer.msg('暂无优惠券可用',{time:1000});
				return false;
			}
			$('#yhq_box').toggle();
		});
		
		$('.fp_type  ul li').click(function() { 
			TabSelect(".fp_type  ul li", "div.fp_infos", "current", $(this)) 
		});
		
		// $('.fp_type  ul li').eq(0).trigger("click");

		$('#duice').click(function(){
			$('.wthpop').show();
		})
		$('.wthpop>p>span').click(function(){
			$('.wthpop').hide();
		})

		//tab function
		function TabSelect(tab,con,addClass,obj) {
		    var jQuery_self = obj;
		    var jQuery_nav = jQuery(tab);

		    jQuery_nav.removeClass(addClass),
			jQuery_self.addClass(addClass);

		    var jQuery_index = jQuery_nav.index(jQuery_self);
		    var jQuery_con = jQuery(con);
		    jQuery_con.hide(),
			jQuery_con.eq(jQuery_index).show();
		}
		
		// 选择收货地址
		$("#btn_select_address, #btn_change_address").click(function(){
			var itemIds = [];
			$("input[name='itemIds']").each(function(i,item){
				itemIds.push($(this).val());
			});
			var url = rootPath + "/wx/address/toWxAddressListPage";
			var form = $('<form></form>');  
		    form.attr('action', url);  
		    form.attr('method', 'post');
		    form.attr('target', '_self');
		    form.append("<input type='hidden' name='shoppingIds' value='"+itemIds.join(',')+"'/>");
		    form.appendTo("body");
		    form.submit();
		});
		
		
		
		// 查看详情清单
		$("div[name='product_info']").each(function(){
			$(this).click(function(){
				var order_code = $(this).parent().find("div:eq(0)").find("#order_code").val();
				var url = rootPath +"/wx/order/detailProductList";
				var form = $('<form></form>');  
				form.attr('action', url);  
				form.attr('method', 'post');
				form.attr('target', '_self');
				form.append("<input type='hidden' name='orderCode'  value='"+order_code+"'/>");
				form.appendTo("body");
				form.submit();
			});
		});
	});
	/**
	 * 转到购物车商品页面
	 */
	function toShoppingCartProductPage() {
		var txtArr = $('.piclist1_con input');
		var shoppingIds = '';
		for(var i = 0; i < txtArr.length; i ++) {
			shoppingIds += txtArr[i].value + ',';
		}
		window.location.href = '<%=basePath %>/wx/shoppingcart/toShoppingCartProductPage?shoppingIds=' + shoppingIds;
	}
	
	
	
	
	/**
	 * 定义下拉列表加载
	 */
	var selectpicker = function(config) {
		if (typeof config == 'object') {
			if (!config['id'] || !config['url']) {
				return false;
			}
			var defaults = {
				param : {},
				defaultValue : null,
				valueField : 'id',
				textField : 'text',
				defaultAll : false,
				async : true, // 默认异步加载
				loadSuccess : function(data) {
				} // 数据加载成功的回调事件
			};
			config = $.extend(defaults, config || {});
			var $select = $('#' + config.id);
			$.ajax({
				type : 'post',
				url : config.url,
				async : config.async,
				data : config.param,
				dataType : 'json',
				success : function(result) {
					$select.html('');
					if (config.defaultAll) {
						$select.append('<option value="" >请选择</option>');
					}
					var data = result.data || result.rows || result.list || result;
					$.each(data, function(index, row) {
						var value = row[config.valueField];
						var text = row[config.textField];
						if(config.defaultValue && value == config.defaultValue) {
							$select.append('<option value="' + value + '" selected="selected" >' + text + '</option>');
						} else {
							$select.append('<option value="' + value + '" >' + text + '</option>');
						}
					});
					//数据加载成功之后的回调事件
					config.loadSuccess(data); 
				}
			})
		}
	};
	
	$(function() {
		//增值税发票开票选择
		selectpicker({
			id : 'companyNameSelect', // select的id
			url : rootPath + "/pc/my/companyInvoice/listCompanyInvoice",
			param : {}, // 过滤参数
			valueField : 'id',
			editable : true,
			textField : 'companyName',
			loadSuccess : function(){
				// 显示默认开票信息
				if($("#tmp_company_name").val() != ''){
					$("#companyName").val($("#tmp_company_name").val());
					$("#taxNo").val($("#tmp_tax_no").val());
					$("#registeAddress").val($("#tmp_registe_address").val());
					$("#registePhone").val($("#tmp_registe_phone").val());
					$("#openBankName").val($("#tmp_open_bank_name").val());
					$("#bankAccount").val($("#tmp_bank_account").val());
				}else{
					$("#companyNameSelect").prop('selectedIndex', 0);
					$("#companyNameSelect").change();
				}
			}
		});
		$("#companyNameSelect").change(function(){
			var id = $(this).val();
			if (id) {
				$.ajax({
					type: 'POST',
					url: rootPath + "/pc/my/companyInvoice/getCompanyInvoiceById",
					data:{invoiceId: id},
					dataType: 'json',
					success: function(data){
						if (data.resultCode == "1") {
							$("#companyName").val(data.companyInvoice.companyName);
							$("#taxNo").val(data.companyInvoice.taxNo);
							$("#registeAddress").val(data.companyInvoice.registeAddress);
							$("#registePhone").val(data.companyInvoice.registePhone);
							$("#openBankName").val(data.companyInvoice.openBankName);
							$("#bankAccount").val(data.companyInvoice.bankAccount);
						}
					}
				});
			}
		});
		
	});
	
</script>
</head>
<style type="text/css">
/*select input css*/
.iInput {
	position: absolute;
	width: 80%;
	height: 0.48rem;
	left: 0.03rem;
	top: 0.02rem;
	border-bottom: 0px;
	border-right: 0px;
	border-left: 0px;
	border-top: 0px;font-size:0.28rem;
	background-color:#FFF;
	/*background: transparent;*/
    line-height: 0.42rem;
    text-indent: 0.2rem;
    outline: none;
}

.errorBorder {
	border: 0.02rem solid #FF0000 !important;
}

.fp_list3 ul li{display:inline-block;width:100%;padding:0.15rem 0;position:relative;}
.fp_list3 ul li strong{position:absolute;left:0;top:0.15rem;width:1.2rem;font-size:0.28rem;line-height:0.52rem;font-weight:400;}
.fp_list3 ul li .txt1{margin-left:1.2rem;height:0.48rem;margin-right:0.2rem;}
.fp_list3 ul li .txt1 .inputstyle1{
	line-height: 0.52rem;
    height: 0.52rem;
    border: 0.02rem solid #e8e8e8;
    border-radius: 0.08rem;
    width: 100%;
    font-size: 0.28rem;
    text-indent: 0.2rem;
}
</style>
<body style="background: #f5f5f5">
	<c:set var="rootPath" value="<%=basePath %>"></c:set>
	<c:set var="imgRootURL" value="<%=imgRootURL %>"></c:set>
	<c:set var="ossImgZoomWX" value="<%=ossImgZoomWX %>"></c:set>
	
	<%--优惠券 --%>
	<div class="overlay" id="yhq_box" style="display:none">
		<div class="yh_box">
	    	<div class="hd">
	        	<h3>优惠券</h3>
	        </div>
	        <div class="bd1">
	        	<div class="yhq_list_con">
	        	<ul>
	        		<c:forEach items="${couponList}" var="coupon">
	        			<li>
	        				<label>
								<div class="box5">
									<input type="hidden"  id="user_coupon_id" value="${coupon.userCouponId}"/>
									<input type="hidden"  id="user_coupon_money" value="<fmt:formatNumber type="number" value="${coupon.couponAmount }" pattern="0.00" />"/>
									<strong>
										<b style="color:#ff0a37">
											<u>￥</u>
											<span><fmt:formatNumber type="number" value="${coupon.couponAmount }" pattern="0" /></span><br>
										</b><i class="icon_top"></i><i class="icon_bottom"></i>
									</strong>
									<div class="item-info">
										<h2>${coupon.couponName}</h2>
										<dl>
											<dt>[全品类]</dt>
											<dt>有效期：<fmt:formatDate type="date" value="${coupon.endTime}"/></dt>
										</dl>
									</div>
			                        <s></s>
								</div>
							</label>
						</li>
	        		</c:forEach>
				</ul>
	            </div>
	        </div>
	        <div class="footerfixed"></div>
	        <div class="bottom">
	        	<p>
	            	<input type="button" class="inputbtn1" value="确 定" />
	             </p>
	        </div>
	    </div>
	</div>
	
	<%--发票 --%>
	<div class="overlay" id="fp_box" style="display: none">
		<div class="fp_box">
			<div class="hd">
				<h3>发票信息</h3>
			</div>
			<div class="bd">
				<div class="fp_info1">
					<div class="hd1">
						<h3>发票类型</h3>
					</div>
					<div class="bd1">
						<div class="fp_type">
							<ul>
								<li type="01" ${orderInvoiceInfo.invoiceType == "01" ? "class='current'" : "" }>不开发票</li>
								<li type="02" ${orderInvoiceInfo.invoiceType == "02" ? "class='current'" : "" }>普通发票</li>
								<li type="03" ${orderInvoiceInfo.invoiceType == "03" ? "class='current'" : "" }>增值税发票</li>
							</ul>
						</div>
					</div>
					<div class="fp_infos" style="${orderInvoiceInfo.invoiceType == '01' ? 'display: block;' : 'display:none;' }" ></div>
					<div class="fp_infos" style="${orderInvoiceInfo.invoiceType == '02' ? 'display: block;' : 'display:none;' }" >
						<div class="fp_list3">
							<ul>
								<li>
									<strong>发票抬头</strong>
									<div class="txt1">
										<input id="invoiceTitle" name="invoiceTitle" 
											<c:if test="${empty orderInvoiceInfo.compnayName }">value="${companyInfo.companyName }"</c:if>
											<c:if test="${not empty orderInvoiceInfo.compnayName }">value="${orderInvoiceInfo.compnayName }"</c:if> 
											type="text" class="inputstyle1" />
									</div>
								</li>
								<li>
									<strong>税号</strong>
									<div class="txt1">
										<input id="taxCode" name="taxCode" 
											<c:if test="${empty orderInvoiceInfo.taxNo }">value="${companyInfo.taxNo }"</c:if>
											<c:if test="${not empty orderInvoiceInfo.taxNo }">value="${orderInvoiceInfo.taxNo }"</c:if> 
											type="text" class="inputstyle1" />
									</div>
								</li>
							</ul>
						</div>
						
					</div>
					<div class="fp_infos" style="${orderInvoiceInfo.invoiceType == '03' ? 'display: block;' : 'display:none;' }" >
						<div class="fp_list3">
							<ul>
								<input type="hidden"  id="tmp_company_name" value="${orderInvoiceInfo.compnayName }"/>
								<input type="hidden"  id="tmp_tax_no" value="${orderInvoiceInfo.taxNo }"/>
								<input type="hidden"  id="tmp_registe_address" value="${orderInvoiceInfo.registeAddress }"/>
								<input type="hidden"  id="tmp_registe_phone" value="${orderInvoiceInfo.registePhone }"/>
								<input type="hidden"  id="tmp_open_bank_name" value="${orderInvoiceInfo.openBankName }"/>
								<input type="hidden"  id="tmp_bank_account" value="${orderInvoiceInfo.bankAccount }"/>
								<li>
									<strong>单位名称</strong>
									<div class="txt1">
										<div style="position:relative;height:0.56rem;margin-bottom: 0.15rem;">
											<select id="companyNameSelect"  class="select1" style="width:100%;font-size:0.24rem;height:0.52rem;border:0.02rem solid #e8e8e8;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-webkit-appearance:none;background: url(../../statics_wx/images/down.png) #fff no-repeat right center;background-size:auto 0.52rem;" >
											</select>
											<input id="companyName" maxlength="100" name="companyName" 
												<c:if test="${empty orderInvoiceInfo.compnayName }">value="${companyInfo.companyName }"</c:if>
												<c:if test="${not empty orderInvoiceInfo.compnayName }">value="${orderInvoiceInfo.compnayName }"</c:if>  
												class="iInput"  placeholder="单位名称"/>
										</div>
									</div>
								</li>
								<li>
									<strong>税号</strong>
									<div class="txt1">
										<input id="taxNo" type="text" maxlength="20" class="inputstyle1" placeholder="税号" />
									</div>
								</li>
								<li>
									<strong>注册地址</strong>
									<div class="txt1">
										<input id="registeAddress"  type="text" maxlength="100" class="inputstyle1" placeholder="注册地址" />
									</div>
								</li>
								<li>
									<strong>注册电话</strong>
									<div class="txt1">
										<input id="registePhone"  type="text" maxlength="20" class="inputstyle1" placeholder="注册电话" />
									</div>
								</li>
								<li>
									<strong>开户银行</strong>
									<div class="txt1">
										<input id="openBankName" type="text" maxlength="100" class="inputstyle1" placeholder="开户银行" />
									</div>
								</li>
								<li>
									<strong>银行账号</strong>
									<div class="txt1">
										<input id="bankAccount" type="text" maxlength="30" class="inputstyle1" placeholder="银行账户" />
									</div>
								</li>
							</ul>
						</div>
						
						
					</div>
				</div>

			</div>
			<div class="footerfixed3"></div>
			<div class="bottom">
				<p>
					<input type="button" id="btn_select_fp" class="inputbtn1" value="确 定" />
				</p>
			</div>
		</div>
	</div>
	
	<%--配置方式 --%>
	<div class="overlay" id="ps_box" style="display: none">
		<div class="ps_box">
			<div class="hd">
				<h3>配送方式</h3>
			</div>
			<div class="bd">
				<dl>
					<c:forEach items="${deliveryModelList }" var="deliveryModel">
						<dt>
							<label name="delivery_model" model_value= "${deliveryModel.modeValue }" }  class="${deliveryModel.defaultFlag == '1'?'checked':''}">
								<strong>${deliveryModel.modeName }</strong> <b></b>
							</label>
						</dt>
					</c:forEach>
				</dl>
			</div>
			<div id="con_delivery_intro" class="ly_part" style="display:none;">
				<p style="margin-bottom:20px;">
					<input type="text" id="delivery_intro" name="deliveryIntro" placeholder="请输入配送要求">
				</p>
			</div>
			<div class="bottom">
				<p>
					<input type="button" id="btn_select_delivery_type" class="inputbtn1" value="确 定" />
				</p>
			</div>
		</div>
	</div>
	
	
	<%--运费支付方式 --%>
	<div class="overlay" id="yf_box" style="display: none">
		<div class="yf_box">
			<div class="hd">
				<h3>运费支付方式</h3>
			</div>
			<div class="bd">
				<dl>
					<%--
					<dt>
						<label id="lab_delivery_fee_pay_type_01"  delivery_fee_pay_type= "01">
						<strong>立即支付</strong>
						<span>后台人员核算运费</span><b></b>
						</label>
					</dt>
					--%>
					<dt>
						<label id="lab_delivery_fee_pay_type_02"  delivery_fee_pay_type= "02"  class="checked">
						<strong>运费到付</strong><span>到货后支付运费给物流</span> <b></b>
						</label>
					</dt>
				</dl>
			</div>
			<div class="bottom">
				<p>
					<input type="button" id="btn_select_delivery_fee_pay_type" class="inputbtn1" value="确 定" />
				</p>
			</div>
		</div>
	</div>
	
	<%--积分 --%>
	<div class="overlay" id="jf_box" style="display: none">
		<div class="ps_box">
			<div class="hd">
				<h3>积分</h3>
			</div>
			<div class="bd">
				<dl>
					<dt>
						<label name="usable_points" class="checked" point_type="01">
							<strong>不使用</strong> <b></b>
						</label>
					</dt>
					<dt>
						<label  name="usable_points"  point_type="02" use_point="${customerPointUsable }"> 
							<strong>本笔订单可用积分${customerPointUsable}</strong>
							<b></b>
						</label>
					</dt>
				</dl>
			</div>
			<div class="bottom">
				<p>
					<input type="button" id="btn_select_point" class="inputbtn1" value="确 定" />
				</p>
			</div>
		</div>
	</div>
	
	<%--支付方式 --%>
	<div class="overlay" id="zffs_box" style="display: none">
		<div class="ps_box">
			<div class="hd">
				<h3>支付方式</h3>
			</div>
			<div class="bd">
				<dl>
					<c:if test="${payModel == '01'}">
						<dt>
							<label name="pay_model" id="lab_pay_model_01" pay_type="01" class="checked"><strong>立即支付</strong> <b></b></label>
						</dt>
					</c:if>
					<c:if test="${payModel == '02'}">
						<dt>
							<label name="pay_model" id="lab_pay_model_01" pay_type="01" class="checked"><strong>立即支付</strong> <b></b></label>
						</dt>
						<dt>
							<labe name="pay_model" id="lab_pay_model_02"l pay_type="02"> <strong>货到付款</strong> <b></b></label>
						</dt>
					</c:if>
					<c:if test="${payModel == '01,02'}">
						<dt>
							<label name="pay_model" id="lab_pay_model_01" pay_type="01" class="checked"><strong>立即支付</strong> <b></b></label>
						</dt>
						<dt>
							<label name="pay_model" id="lab_pay_model_02" pay_type="02"> <strong>货到付款</strong> <b></b></label>
						</dt>
					</c:if>
				</dl>
			</div>
			<div class="bottom">
				<p>
					<input type="button" id="btn_select_pay_type" class="inputbtn1" value="确 定" />
				</p>
			</div>
		</div>
	</div>
	
	<%--默认或已选择的收货地址 --%>
	<div class="address_part">
		<div class="address_middle">
			<c:if test="${address ==null }">
				<div class="address_box">
					<i></i>
					<div class="address_box_con">
						<p>
							<a id="btn_select_address" href="javascript:void(0)" style="font-size:0.28rem;color:#ff124a;">单击选择收货地址</a>
						</p>
					</div>
				</div>
			</c:if>
			<c:if test="${address !=null }">
				<div class="address_box">
					<i></i>
					<div id="btn_change_address" class="address_box_con">
						<input type="hidden"  id="delivery_address_id"  value="${address.id }"/>
						<h2>
							<strong>${address.receiverName }</strong><span>${address.mobile }</span><c:if test="${address.isDefault == 1 }"><em>默认</em></c:if>
						</h2>
						<p>${address.provinceName}${address.cityName}${address.areaName}${address.streetName}${address.address}</p>
					</div>
				</div>
			</c:if>
		</div>
		<div class="address_bottom"></div>
	</div>
	<div class="order_info1">
		<div class="bd">
			<a href="#" onclick="javascript: toShoppingCartProductPage();">
				<div class="piclist1">
					<!-- 购物车数量 -->
					<c:set var="shoppingCount" value="${shoppingcart.size()}" ></c:set>
					<div class="piclist1_con">
						<ul>
							<c:forEach items="${shoppingcart }" var="item">
								<!-- 不取条数，取总数 -->
								<c:set var="shoppingCount" value="${shoppingCount + item.buyNum - 1}" ></c:set>
								<input type="hidden"  name="itemIds"  value="${item.id}"/>
								<li><img src="${imgRootURL}/${item.imagePath}${ossImgZoomWX}"></li>
							</c:forEach>
						</ul>
					</div>
					<b><i>共${shoppingCount}件</i><em></em></b>
				</div>
			</a>
			
			<div class="fpxx">
				<ul>
					<li>
						<p>
							<strong>支付</strong><a href="javascript:void(0)" id="zfbtn"><span><em>立即支付</em><i></i></span></a>
						</p>
					</li>
					<li>
						<p>
							<strong>配送</strong><a href="javascript:void(0)" id="psbtn"><span><em>普通物流</em><i></i></span></a>
						</p>
					</li>
					<%--
					<li>
						<p>
							<strong>运费支付</strong><a href="javascript:void(0)" id="yfbtn"><span><em>货到支付</em><i></i></span></a>
						</p>
					</li>
					--%>
					<li style="padding-left:10px;">
						<input id="pay_delivered_fee" type="checkbox" value="02" ><label for="pay_delivered_fee" style="font-size:.28rem;font-weight: 400;" >&nbsp;&nbsp;运费到付</label>
						<span id="delivery_fee_tip" style="color:#e72e25;display:none;margin-right:20px;font-size:.28rem;font-weight: 400;">(您已选择运费到付)</span>
					</li>
					<li>
						<p>
							<strong>发票</strong><a href="javascript:void(0)" id="fpbtn"><span><em>
								<c:if test="${orderInvoiceInfo.invoiceType == '01' }" >不开发票</c:if>
								<c:if test="${orderInvoiceInfo.invoiceType == '02' }" >普通发票</c:if>
								<c:if test="${orderInvoiceInfo.invoiceType == '03' }" >增值税发票</c:if>
							</em><i></i></span></a>
						</p>
					</li>
				</ul>
			</div>

		</div>
	</div>
	<div class="fpxx fpxx1">
		<ul>
			<li>
				<p>
					<strong>优惠券</strong><a id="yhqbtn" href="javascript:void(0)"><span><em>不使用</em><i></i></span></a>
				</p>
			</li>
			<li>
				<p>
					<input type="hidden" id="customer_point_usable"  value="${customerPointUsable }"/>
					<strong>积分（本笔订单可用积分${customerPointUsable}）</strong>
					<a href="javascript:void(0)" id="jfbtn">
						<span>
							<em use_point="0">不使用</em>
							<em use_point="${customerPointUsable}" class="a1" style="display: none">-¥${customerPointUsable}</em><i></i>
						</span>
					</a>
				</p>
			</li>
		</ul>
	</div>
	<div class="ly_part">
		<p>
			<input type="text" id="intro" name="intro" placeholder="选填：填写备注信息">
		</p>
	</div>
	<div class="order_info3">
		<div class="order_info3_con">
			<ul>
				<li>
					<p>
						<strong>商品金额</strong> <span>￥<em><sl:nformat num="${totalProductPrice}" format=".00" type="2"/></em>
								  <sl:nformat num="${totalProductPrice}" format=".00" type="3"/>
						</span>
					</p>
				</li>
				<li>
					<p>
						<strong>优惠券抵扣金额</strong><span id="orderCouponMoney">-￥<em>0</em>.00</span>
					</p>
				</li>
				<li>
					<p>
						<strong>积分抵扣金额</strong><span id="orderPointMoney">-￥<em>0</em>.00</span>
					</p>
				</li>
				<li>
					<p>
						<strong>订单促销优惠</strong><span id="orderPromotionMoney">
							<c:if test="${promotionMoney != null && promotionMoney > 0}">
								-￥<em><sl:nformat num="${promotionMoney}" format=".00" type="2"/></em>
								<sl:nformat num="${promotionMoney}" format=".00" type="3"/>
							</c:if>
							<c:if test="${promotionMoney == null || promotionMoney == 0}">
								-￥<em>0</em>.00
							</c:if>
						</span>
					</p>
				</li>
				<li>
					<p>
						<input type="hidden" id="order_delivery_fee" value="0"/>
						<strong>运费</strong><span id="p_delivery_fee"><em>0</em>.00</span>
					</p>
				</li>
				<li style="text-align:right;">
					<p style="font-size:11px;color:red;padding-right:10px;">根据区域不同，运费审核时可能会有调整</p>
				</li>
			</ul>
		</div>
	</div>
	<div class="footerfixed3"></div>
	<div class="footer">
		<div class="order_bottom">
			<ul>
				<li>
					<input type="hidden" id="order_real_pay_money" value="${realPayMoney}"/>
					<p id="order_real_pay_money_container">
						应付款：￥<em><sl:nformat num="${realPayMoney}" format=".00" type="2"/></em>
								  <sl:nformat num="${realPayMoney}" format=".00" type="3"/>
					</p>
				</li>
				<li><a href="javascript:void(0)" class="btn1" id="btn_commit_order">提交订单</a></li>
			</ul>
		</div>
	</div>
	
	<input id="normal_delivery_address_ids" type="hidden" value="${normalDeliveryAddressIds}"/>
	<input id="express_delivery_address_ids" type="hidden" value="${expressDeliveryAddressIds}"/>
	<input id="normal_delivery_fee" type="hidden" value="${deliveryFee.normalDeliveryFee == null ? 0 : deliveryFee.normalDeliveryFee}" />
	<input id="express_delivery_fee" type="hidden" value="${deliveryFee.expressDeliveryFee == null ? 0 : deliveryFee.expressDeliveryFee}" />
	<input id="other_delivery_fee" type="hidden" value="${deliveryFee.otherDeliveryFee == null ? 0 : deliveryFee.otherDeliveryFee}" />
	<input id="shareId" type="hidden" value="${shareId}"/>
	
</body>
</html>

